package f;

import c.b.a.a.a;
import java.io.IOException;

/* compiled from: Protocol */
public enum w {
    HTTP_1_0("http/1.0"),
    HTTP_1_1("http/1.1"),
    SPDY_3("spdy/3.1"),
    HTTP_2("h2"),
    H2_PRIOR_KNOWLEDGE("h2_prior_knowledge"),
    QUIC("quic");
    
    public final String a;

    public w(String str) {
        this.a = str;
    }

    public static w a(String str) throws IOException {
        w wVar = HTTP_1_0;
        if (str.equals("http/1.0")) {
            return wVar;
        }
        wVar = HTTP_1_1;
        if (str.equals("http/1.1")) {
            return wVar;
        }
        wVar = H2_PRIOR_KNOWLEDGE;
        if (str.equals("h2_prior_knowledge")) {
            return wVar;
        }
        wVar = HTTP_2;
        if (str.equals("h2")) {
            return wVar;
        }
        wVar = SPDY_3;
        if (str.equals("spdy/3.1")) {
            return wVar;
        }
        wVar = QUIC;
        if (str.equals("quic")) {
            return wVar;
        }
        throw new IOException(a.D("Unexpected protocol: ", str));
    }

    public String toString() {
        return this.a;
    }
}
